import static org.junit.Assert.assertEquals;
import org.junit.Test;

/**
 * 
 * @author libai
 *
 *this is the place of test
 */

public class test {
	/*
	@Test public void find0(){
		SortedArrayFinder p=new SortedArrayFinder();
		int[] k={2,4,5,8,10};
		int m=p.find(k, 6);
		assertEquals(3,m);
	}
	@Test public void find1(){
		SortedArrayFinder p=new SortedArrayFinder();
		int[] k={2,4,5,8,10};
		int m=p.find(k, 1);
		assertEquals(0,m);
	}
	@Test public void find2(){
		SortedArrayFinder p=new SortedArrayFinder();
		int[] k={2,4,5,5,8,10};
		int m=p.find(k, 5);
		assertEquals(2,m);
	}
	@Test public void find3(){
		SortedArrayFinder p=new SortedArrayFinder();
		int[] k={2,4,5,5,8,10};
		int m=p.find(k, 12);
		assertEquals(6,m);
	}
	@Test public void find4(){
		CircularArrayFinder p=new CircularArrayFinder();
		int[] k={ 8, 10, 11, 1, 2, 4,4,6};
		int m=p.find(k, 11);
		assertEquals(2,m);
	}
	@Test public void find5(){
		CircularArrayFinder p=new CircularArrayFinder();
		int[] k={ 8, 10, 11, 1, 2, 4,4,6};
		int m=p.find(k, 12);
		assertEquals(3,m);
	}
	@Test public void find6(){
		CircularArrayFinder p=new CircularArrayFinder();
		int[] k={ 8, 10, 11, 1, 2, 4,4,6};
		int m=p.find(k, 1);
		assertEquals(3,m);
	}
	@Test public void find7(){
		CircularArrayFinder p=new CircularArrayFinder();
		int[] k={ 8, 10, 11, 1, 2, 4,4,6};
		int m=p.find(k, 4);
		assertEquals(5,m);
	}
	@Test public void find8(){
		CircularArrayFinder p=new CircularArrayFinder();
		int[] k={ 8, 10, 11, 1, 2, 4,4,6};
		int m=p.find(k, 7);
		assertEquals(8,m);
	}
	*/
	@Test public void find9(){
		CircularArray_binaryfind p=new CircularArray_binaryfind();
		int[] k={ 8, 10, 15, 1, 2, 4, 6};
		int m=p.find(k, 10);
		assertEquals(1,m);
	}
	@Test public void find10(){
		CircularArray_binaryfind p=new CircularArray_binaryfind();
		int[] k={ 8, 10, 15, 1, 2, 4, 6};
		int m=p.find(k, 11);
		assertEquals(2,m);
	}
	@Test public void find11(){
		CircularArray_binaryfind p=new CircularArray_binaryfind();
		int[] k={ 8, 10, 15, 1, 2, 4, 6};
		int m=p.find(k, 15);
		assertEquals(2,m);
	}
	@Test public void find12(){
		CircularArray_binaryfind p=new CircularArray_binaryfind();
		int[] k={ 8, 10, 15, 1, 2, 4, 6};
		int m=p.find(k, 2);
		assertEquals(4,m);
	}
	@Test public void find13(){
		CircularArray_binaryfind p=new CircularArray_binaryfind();
		int[] k={ 8, 10, 15, 1, 2, 4, 6};
		int m=p.find(k, 3);
		assertEquals(5,m);
	}
	@Test public void find14(){
		CircularArray_binaryfind p=new CircularArray_binaryfind();
		int[] k={ 8, 10, 15, 1, 2, 4, 6};
		int m=p.find(k, 7);
		assertEquals(7,m);
	}
	@Test public void find15(){
		CircularArray_binaryfind p=new CircularArray_binaryfind();
		int[] k={ 8, 10, 15, 1, 2, 4, 6};
		int m=p.find(k, 18);
		assertEquals(3,m);
	}
	@Test public void find16(){
		CircularArray_binaryfind p=new CircularArray_binaryfind();
		int[] k={ 9, 10, 15, 18, 22, 42, 60};
		int m=p.find(k, 30);
		assertEquals(5,m);
	}
}
